const app = getApp()
Page({
  data: {
    active: 0,
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    userAuth: null,
    list: []
  },

  onLoad() {
    if (this.getAuth() == 'dispatch') {
      wx.redirectTo({
        url: '/pages/dispatch/tongji/index',
      })
    }
    this.setData({
      list: app.globalData.tabbarlist,
      userAuth: this.getAuth()
    })
  },
  onChange(event) {

    // event.detail 的值为当前选中项的索引
    this.setData({ active: event.detail });
  },
  getAuth() {
    return 'dispatch'
    // return 'moto'
  }
});
